<?php 
$Content = QContext::instance();
$base_url = $Content->requestUDI();
$search = $base_url;
$search['action'] = 'search';
$export = $base_url;
$export['action'] = 'export';

?>
<form id="pagerForm" method="get" action="<?php echo url($base_url,null,null,array('mode'=>'standard'));?>">
		<input type="hidden" name="pageNum" value="<?php echo $pagination['current'];?>" /> <!--【必须】value=1可以写死-->
		<input type="hidden" name="numPerPage" value="<?php echo $pagination['page_size'];?>" /> <!--【可选】每页显示多少条-->
		<input type="hidden" name="orderField" value="<?php echo $orderField;?>" />
		<input type="hidden" name="orderDirection" value="<?php echo $orderDirection;?>" />
</form>

<div class="pageHeader">
	<form rel="pagerForm" onsubmit="return navTabSearch(this);" action="<?php echo url($base_url,null,null,array('mode'=>'standard'));?>" method="get">
	<div class="searchBar">
		<table class="searchContent">
		<tbody>
			<tr>
				<td><label>代理：</label>
				<select name="agent_id">
				<option value="">请选择代理....</option>
				<?php foreach ($agent_list as $k=>$v):?>
				<option value="<?php echo $k;?>" <?php echo isset($param['agent_id'])?$param['agent_id'] == $k?'selected':'':''; ?>><?php echo $v;?></option>
				<?php endforeach;?>
				</select>
				<td>
			
			</tr>
			<tr>
			<td>
				<label>主叫：</label>
				<input type="text" name="src" value="<?php echo isset($param['src'])?$param['src']:'';?>"/>
			</td><td>
				<label>被叫：</label>
				<input type="text" name="dst" value="<?php echo isset($param['dst'])?$param['dst']:'';?>"/>
			</td>
		</tr></tbody></table>
		
		<div class="subBar">
			<ul>
				<li><div class="buttonActive"><div class="buttonContent"><button type="submit">检索</button></div></div></li>
			
			</ul>
		</div>
	</div>
	</form>
</div>
<div class="pageContent">
	<div class="panelBar">
		<ul class="toolBar">
			
			
			<li class="line">line</li>
			
		</ul>
	</div>
	<table class="table" width="1200" layoutH="158">
		<thead>
			<tr>
				<th width="3%"><input type="checkbox" group="ids[]" class="checkboxCtrl"></th>
				<th width="5%" orderField="agent_id" >代理商</th>
				<th width="5%" >帐号</th>
				<th width="5%" >主叫</th>
				<th width="3%" >被叫</th>
				<th width="5%" align="center" >时间</th>
				<th width="5%" >代理费(元)</th>
				<th width="5%" >用户费(元)</th>
				<th width="5%" >信息</th>
				
			</tr>
		</thead>
		<tbody>
		
			<?php foreach ($item as $k=>$v):?>
		
			<tr target="id" rel="<?php echo $v->id?>">
				<td><input name="ids[]" value="<?php echo $v->id?>" type="checkbox"></td>
				<td><?php echo $v->agent_id?></td>
				<td><?php 
				echo $v->acct_id;
				?></td>
				<td><?php echo $v->src;?> </td>
				<td><?php echo $v->dst;?></td>
				<td><?php echo $v->senddate;?></td>
				<td><?php echo sprintf('%f',$v->costagent);?></td>
				<td><?php echo sprintf('%f',$v->costuser);?></td>
				<td><?php echo $v->smstext;?></td>
				
				
			</tr>
			<?php endforeach;?>
		</tbody>
	</table>
	<div class="panelBar">
			<div class="pages">
			<span>显示</span>
			<select name="numPerPage" onchange="navTabPageBreak({numPerPage:this.value})">
				<option value="20" <?php if(isset($param['numPerPage'])&&$param['numPerPage']==20)echo 'selected=selected';?>>20</option>
				<option value="50" <?php if(isset($param['numPerPage'])&&$param['numPerPage']==50)echo 'selected=selected';?>>50</option>
				<option value="100" <?php if(isset($param['numPerPage'])&&$param['numPerPage']==100)echo 'selected=selected';?>>100</option>
				<option value="200" <?php if(isset($param['numPerPage'])&&$param['numPerPage']==200)echo 'selected=selected';?>>200</option>
			</select>
				<span>共 <?php echo $pagination['record_count'];?> 条</span>
			</div>
		
		<div class="pagination" targetType="navTab" totalCount="<?php echo $pagination['record_count'];?>" numPerPage="<?php echo $pagination['page_size'];?>" pageNumShown="10" currentPage="<?php echo $pagination['current'];?>" ></div>

	</div>
</div>